package cn.edu.fzu.delivery.mapper;

import cn.edu.fzu.delivery.domain.entity.CourierDelivery;
import cn.edu.fzu.delivery.domain.enums.DeliveryStatusEnum;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author jiebin
 * @data 2022/11/13
 **/
public interface CourierDeliveryMapper {

    /**
     * 更新快递派送状态
     * 
     * @param deliveryManId
     * @param status
     */
    void updateStatus(@Param("deliverManId") Long deliveryManId, @Param("courierId") String courierId, @Param("status") DeliveryStatusEnum status,
                      @Param("endTime") String endTime);


    void insert(@Param("courierId") String courierId, @Param("deliveryManId") Long deliveryManId,
                @Param("destNetWorkId") Long destNetWorkId);


    /** 查询 **/
    List<CourierDelivery> list(@Param("deliveryManId") Long deliveryManId, @Param("courierId") String courierId,
                               @Param("status") DeliveryStatusEnum status,@Param("destNetWorkId")Long destNetWorkId, @Param("startTime") String startTime,
                               @Param("endTime") String endTime);


    /** 根据目的网点查询出所有的快递单号**/
    List<String> listCourierIdsByNetWork(@Param("destNetWorkId")Long destNetWorkId);
}
